#	$Id:	$

{
package	account;

use	strict;

use     Data::Dumper;
use	lib	$ENV{BANKS};

sub	new()	{

	my	$class	=	shift;
	my	$name	=	shift;
	
	my	$self	=	{	ACCT_NUMBER	=>	undef,
					ACCT_NAME	=>	$name,
					ACCT_TYPE	=>	undef,
				};
				
	bless	$self, $class;

	$self->setAccountNumber;

	print	Dumper($self) . "\n";
	
	return	$self;
}

sub	setAccountNumber()	{

	my	$self	=	shift;
	
	$self->{ACCT_NUMBER}	=	100;
}

sub	setAccountType()	{

	my	$self	=	shift;
	my	$type	=	shift;
	
	$self->{ACCT_TYPE}	=	$type;

}

sub	getAccountType()	{

	my	$self	=	shift;
	
	return	$self->{ACCT_TYPE};

}

sub	getAccountName()	{

	my	$self	=	shift;
	
	return	$self->{ACCT_NAME};
}


sub	operate()	{

	#	Default is to not operate on the account.  Expected to be overridden by sub-classes.
}

sub	execute()	{

	#	Execute the account
	
	my	$self	=	shift;

	#	Perform common ops on an account

	print	"NAME=" . $self->getAccountName . ", Type =" . $self->getAccountType;


	#	Perform ops specific to the account type
	
	$self->operate;
}


}	#	Class:	account
	
1;

